#LOCAL("ErrorItemNo",0)
#WITH_ERROR(#FormError)
<div class="InputBlock#IF(#GET("FormError_" . #Attribute.Alias))#IF((#Attribute.Type NE "Date") AND (#Attribute.Type NE "Time") AND (#Attribute.Type NE "DateTime")) DialogError#ENDIF#ENDIF">
#LOCAL("ErrorValue", #FUNCTION("ERROR_VALUE", #GET(#Attribute.Alias), #GET("Customer.".#Attribute.Alias)))
<div class="InputLabelling">
#Attribute.NameOrAlias #IF(#IsMandatory){MandatoryStar}#ENDIF
</div>
<div class="InputField">
#IF(#Attribute.Type EQ "String" OR #Attribute.Type EQ "LocalizedString" OR #Attribute.Type EQ "EMail")#IF(#Attribute.Length)
  <input class="LongText ep-metaparse #IF(#IsMandatory) #REMep.uiValidate({required:true})#ENDREM #ELSE ep.uiInput() #ENDIF" type="text" id="#Attribute.Alias" name="#Attribute.Alias" value="#ErrorValue" maxlength="#Attribute.Length" />#ELSE
  <textarea class="LongText ep-metaparse #IF(#IsMandatory) ep.uiInput({required:true #IF(#DEFINED(#Attribute.Description) AND #Attribute.Description) ,info:'#Attribute.Description'#ENDIF }) #ELSE ep.uiInput(#IF(#DEFINED(#Attribute.Description) AND #Attribute.Description){info:'#Attribute.Description'}#ENDIF) #ENDIF" name="#Attribute.Alias" cols="60" rows="8">#ErrorValue</textarea>
  #ENDIF
#ELSIF(#Attribute.Type EQ "Boolean")
  <input type="radio" class="ep-metaparse #IF(#IsMandatory) #REMep.uiValidate({required:true})#ENDREM #ELSE ep.uiInput() #ENDIF" id="#Attribute.Alias[0]_on" name="#Attribute.Alias" value="1"#IF(#ErrorValue) checked="checked"#ENDIF />
  <label for="#Attribute.Alias[0]_on">{yes}</label>
  <input type="radio" class="ep-metaparse #IF(#IsMandatory) #REMep.uiValidate({required:true})#ENDREM #ELSE ep.uiInput() #ENDIF" id="#Attribute.Alias[0]_off" name="#Attribute.Alias" value="0"#IF(NOT #ErrorValue) checked="checked"#ENDIF />
  <label for="#Attribute.Alias[0]_off">{no}</label>
  <div class="LeftSmallMargin">#Attribute.Description</div>
#ELSIF(#Attribute.Type EQ "PreDefString" OR #Attribute.Type EQ "PreDefLocalizedString" )
  <select name="#Attribute.Alias" class="Text ep-metaparse #IF(#IsMandatory) #REMep.uiValidate({required:true #IF(#DEFINED(#Attribute.Description) AND #Attribute.Description) ,info:'#Attribute.Description' #ENDIF})#ENDREM #ELSE ep.uiInput(#IF(#DEFINED(#Attribute.Description) AND #Attribute.Description){info:'#Attribute.Description'}#ENDIF) #ENDIF">
    <option value="" >{EmptyEntry}</option>
    #LOOP(#Attribute.PreDefAttributes)
      <option value="#ID" #IF(#DEFINED(#ErrorValue.ID) AND #ID EQ #ErrorValue.ID)selected="selected"#ENDIF>#IF(#DEFINED(#Value))#Value#ELSE#Alias#ENDIF</option>
    #ENDLOOP
  </select>
#ELSIF(#Attribute.Type EQ "Integer")#SET("ErrorValue", #FUNCTION("ERROR_VALUE", #GET(#Attribute.Alias), #ErrorValue[integer]))
<script type="text/javascript">
  ep.require('ep.ui.datepicker');
</script>
  <input class="LongText ep-metaparse #IF(#IsMandatory) #REMep.uiValidate({required:true #IF(#DEFINED(#Attribute.Description) AND #Attribute.Description) ,info:'#Attribute.Description' #ENDIF})#ENDREM #ELSE ep.uiInput(#IF(#DEFINED(#Attribute.Description) AND #Attribute.Description) {info:'#Attribute.Description'} #ENDIF)#ENDIF" type="text" name="#Attribute.Alias" value="#ErrorValue" maxlength="20"/>
#ELSIF(#Attribute.Type EQ "Float")#SET("ErrorValue", #FUNCTION("ERROR_VALUE", #GET(#Attribute.Alias), #ErrorValue[float]))
<script type="text/javascript">
  ep.require('ep.ui.datepicker');
</script>
<input class="LongText ep-metaparse #IF(#IsMandatory) #REMep.uiValidate({required:true #IF(#DEFINED(#Attribute.Description) AND #Attribute.Description) ,info:'#Attribute.Description' #ENDIF})#ENDREM #ELSE ep.uiInput(#IF(#DEFINED(#Attribute.Description) AND #Attribute.Description){info:'#Attribute.Description'}#ENDIF) #ENDIF" type="text" name="#Attribute.Alias" value="#ErrorValue" maxlength="20"/>
#ELSIF(#Attribute.Type EQ "Money")#LOCAL("CurrencyID", #Shop.CurrencyID)#SET("ErrorValue", #FUNCTION("ERROR_VALUE", #GET(#Attribute.Alias), #ErrorValue[money]))
<script type="text/javascript">
  ep.require('ep.ui.datepicker');
</script>
  <input class="Money ep-metaparse #IF(#IsMandatory) #REMep.uiValidate({required:true #IF(#DEFINED(#Attribute.Description) AND #Attribute.Description) ,info:'#Attribute.Description' #ENDIF })#ENDREM #ELSE ep.uiInput(#IF(#DEFINED(#Attribute.Description) AND #Attribute.Description) {info:'#Attribute.Description'} #ENDIF) #ENDIF" type="text" name="#Attribute.Alias" value="#ErrorValue" maxlength="20"/>
#ENDLOCAL
#ELSIF(#Attribute.Type EQ "DateTime")#IF(NOT #FormError) #SET("ErrorValue", #ErrorValue[datetime])#ENDIF
<script type="text/javascript">
  ep.require('ep.ui.datepicker');
</script>
  <input class="Datetimeinput ep-metaparse ep.uiDatepicker({ #IF(#IsMandatory) required:true, #ENDIF info:'#Attribute.Description'})" type="text" name="#Attribute.Alias" value="#ErrorValue" maxlength="40" />
#ELSIF(#Attribute.Type EQ "Time")#IF(NOT #FormError) #SET("ErrorValue", #ErrorValue[time])#ENDIF
<script type="text/javascript">
  ep.require('ep.ui.datepicker');
</script>
  <input class="ep-metaparse ep.uiDatepicker({ #IF(#IsMandatory) required:true, #ENDIF format:'t',time:true, numberOfMonths:0, info:'#Attribute.Description'})" type="text" id="#Attribute.Alias" name="#Attribute.Alias" value="#ErrorValue" maxlength="20" />
#ELSIF(#Attribute.Type EQ "Date")#IF(NOT #FormError) #SET("ErrorValue", #ErrorValue[date])#ENDIF
<script type="text/javascript">
  ep.require('ep.ui.datepicker');
</script>
  <input class="ep-metaparse ep.uiDatepicker({#IF(#IsMandatory) required:true, #ENDIF format:'d', time:false, info:'#Attribute.Description'})" type="text" name="#Attribute.Alias" value="#ErrorValue" maxlength="20" />
#ENDIF
#IF(#DEFINED(#Attribute.Description) AND #Attribute.Description AND #Attribute.Type NE "Boolean")
<noscript>
  <div class="LeftSmallMargin">#Attribute.Description</div>
</noscript>
#ENDIF
</div>
#ENDLOCAL
 </div>
#ENDWITH_ERROR
#ENDLOCAL
